/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class TxTransferRecord extends BaseEntity {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.tx_hash
     *
     * @mbg.generated
     */
    private String txHash;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.block_hash
     *
     * @mbg.generated
     */
    private String blockHash;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.block_number
     *
     * @mbg.generated
     */
    private Long blockNumber;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.block_timestamp
     *
     * @mbg.generated
     */
    private Long blockTimestamp;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.contract_address
     *
     * @mbg.generated
     */
    private String contractAddress;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.from_address
     *
     * @mbg.generated
     */
    private String fromAddress;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.to_address
     *
     * @mbg.generated
     */
    private String toAddress;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.quantity
     *
     * @mbg.generated
     */
    private String quantity;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.token_type
     *
     * @mbg.generated
     */
    private String tokenType;

    private Long tokenId;

    public Long getTokenId() {
        return tokenId;
    }

    public void setTokenId(Long tokenId) {
        this.tokenId = tokenId;
    }

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.create_timestamp
     *
     * @mbg.generated
     */
    private Date createTimestamp;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tx_transfer_record.update_timestamp
     *
     * @mbg.generated
     */
    private Date updateTimestamp;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.tx_hash
     *
     * @return the value of tx_transfer_record.tx_hash
     * @mbg.generated
     */
    public String getTxHash() {
        return txHash;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.tx_hash
     *
     * @param txHash the value for tx_transfer_record.tx_hash
     * @mbg.generated
     */
    public void setTxHash(String txHash) {
        this.txHash = txHash == null ? null : txHash.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.block_hash
     *
     * @return the value of tx_transfer_record.block_hash
     * @mbg.generated
     */
    public String getBlockHash() {
        return blockHash;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.block_hash
     *
     * @param blockHash the value for tx_transfer_record.block_hash
     * @mbg.generated
     */
    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash == null ? null : blockHash.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.block_number
     *
     * @return the value of tx_transfer_record.block_number
     * @mbg.generated
     */
    public Long getBlockNumber() {
        return blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.block_number
     *
     * @param blockNumber the value for tx_transfer_record.block_number
     * @mbg.generated
     */
    public void setBlockNumber(Long blockNumber) {
        this.blockNumber = blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.block_timestamp
     *
     * @return the value of tx_transfer_record.block_timestamp
     * @mbg.generated
     */
    public Long getBlockTimestamp() {
        return blockTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.block_timestamp
     *
     * @param blockTimestamp the value for tx_transfer_record.block_timestamp
     * @mbg.generated
     */
    public void setBlockTimestamp(Long blockTimestamp) {
        this.blockTimestamp = blockTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.contract_address
     *
     * @return the value of tx_transfer_record.contract_address
     * @mbg.generated
     */
    public String getContractAddress() {
        return contractAddress;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.contract_address
     *
     * @param contractAddress the value for tx_transfer_record.contract_address
     * @mbg.generated
     */
    public void setContractAddress(String contractAddress) {
        this.contractAddress = contractAddress == null ? null : contractAddress.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.from_address
     *
     * @return the value of tx_transfer_record.from_address
     * @mbg.generated
     */
    public String getFromAddress() {
        return fromAddress;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.from_address
     *
     * @param fromAddress the value for tx_transfer_record.from_address
     * @mbg.generated
     */
    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress == null ? null : fromAddress.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.to_address
     *
     * @return the value of tx_transfer_record.to_address
     * @mbg.generated
     */
    public String getToAddress() {
        return toAddress;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.to_address
     *
     * @param toAddress the value for tx_transfer_record.to_address
     * @mbg.generated
     */
    public void setToAddress(String toAddress) {
        this.toAddress = toAddress == null ? null : toAddress.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.quantity
     *
     * @return the value of tx_transfer_record.quantity
     * @mbg.generated
     */
    public String getQuantity() {
        return quantity;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.quantity
     *
     * @param quantity the value for tx_transfer_record.quantity
     * @mbg.generated
     */
    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.token_type
     *
     * @return the value of tx_transfer_record.token_type
     * @mbg.generated
     */
    public String getTokenType() {
        return tokenType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.token_type
     *
     * @param tokenType the value for tx_transfer_record.token_type
     * @mbg.generated
     */
    public void setTokenType(String tokenType) {
        this.tokenType = tokenType == null ? null : tokenType.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.create_timestamp
     *
     * @return the value of tx_transfer_record.create_timestamp
     * @mbg.generated
     */
    public Date getCreateTimestamp() {
        return createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.create_timestamp
     *
     * @param createTimestamp the value for tx_transfer_record.create_timestamp
     * @mbg.generated
     */
    public void setCreateTimestamp(Date createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column tx_transfer_record.update_timestamp
     *
     * @return the value of tx_transfer_record.update_timestamp
     * @mbg.generated
     */
    public Date getUpdateTimestamp() {
        return updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column tx_transfer_record.update_timestamp
     *
     * @param updateTimestamp the value for tx_transfer_record.update_timestamp
     * @mbg.generated
     */
    public void setUpdateTimestamp(Date updateTimestamp) {
        this.updateTimestamp = updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_transfer_record
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TxTransferRecord that = (TxTransferRecord) o;
        return Objects.equals(txHash, that.txHash) &&
                Objects.equals(blockHash, that.blockHash) &&
                Objects.equals(blockNumber, that.blockNumber) &&
                Objects.equals(blockTimestamp, that.blockTimestamp) &&
                Objects.equals(contractAddress, that.contractAddress) &&
                Objects.equals(fromAddress, that.fromAddress) &&
                Objects.equals(toAddress, that.toAddress) &&
                Objects.equals(quantity, that.quantity) &&
                Objects.equals(tokenType, that.tokenType) &&
                Objects.equals(tokenId, that.tokenId) &&
                Objects.equals(createTimestamp, that.createTimestamp) &&
                Objects.equals(updateTimestamp, that.updateTimestamp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(txHash, blockHash, blockNumber, blockTimestamp, contractAddress, fromAddress, toAddress, quantity, tokenType, tokenId, createTimestamp, updateTimestamp);
    }
}